package com.molichuxing.services.infrastructure.dto.response;

import com.molichuxing.framework.dto.ResponseRootDto;
import com.molichuxing.services.property.BasicEnum;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class CheckDisputeDto extends ResponseRootDto {
    /**
     * id id
     */
    private Integer id;

    /**
     * 检验ID check_id
     */
    private Integer checkId;

    /**
     * 用户是否认可(0:不认可，1：认可) is_user_approves
     */
    private Boolean isUserApproves;

    /**
     * 用户是否认可(0:不认可，1：认可) is_user_approves
     */
    private String isUserApprovesStr;

    /**
     * 不认可原因 reason
     */
    private String reason;

    private BigDecimal discussLossFee;

    /**
     * 协商质损说明 remark
     */
    private String remark;

    /**
     * 操作人 op_name
     */
    private String opName;

    /**
     * 操作时间 check_time
     */
    private LocalDateTime checkTime;
    /**
     * 创建时间 gmt_create
     */
    private LocalDateTime gmtCreate;

    /**
     * 更新时间 gmt_modified
     */
    private LocalDateTime gmtModified;

    /**
     * cars_check_dispute
     */
    private static final long serialVersionUID = 1L;

    public void setUserApproves(Boolean userApproves) {
        isUserApproves = userApproves;
        if(userApproves) {
            this.isUserApprovesStr = BasicEnum.YES.getName();
        }else {
            this.isUserApprovesStr = BasicEnum.NO.getName();
        }
    }
}